package com.caiyigo.test.arithmetic.simplefactory;

public class CashFactory {
	public static CashSuper createCashAccept(String type) {
		CashSuper cSuper = null;
		switch (type) {
		case "正常收费":
			cSuper = new CashNormal();
			break;
		case "满300返100":
			CashReturn cr = new CashReturn("300", "100");
			cSuper = cr;
			break;
		case "打8折":
			CashRebate cr2 = new CashRebate("0.8");
			cSuper = cr2;
			break;
		default:
			break;
		}
		return cSuper;
	}
}
